#ifndef QCUSTOMLIBRARY_H
#define QCUSTOMLIBRARY_H

#include "PluginManagerDef.h"
#include <QLibrary>
#include <QMap>

typedef  QMap<QString,QLibrary*>  StringMapLib;
typedef  QMap<QString,HANDLE> StringMapHandle;

class QCustomLibrary  : public PluginManagerImp
{
public:
	QCustomLibrary();
	~QCustomLibrary();

protected:
	virtual bool		initPluginModule(HANDLE  pInstance);
	virtual bool		unLoadPlugin(bool all = false){return false;};
	virtual bool		unLoadPlugin(const wchar_t* filename);
	virtual	bool		loadPlugin(const wchar_t* filename) ;
	virtual	HANDLE		getModuleInterface(const wchar_t* interfaceName) ;
	virtual void*		getAppModule(const wchar_t* dllname);

private:
	void*				getSymbolFun(QString fileName,char* funName );
private:
	StringMapLib		m_stringMapLib;
};

#endif // QCUSTOMLIBRARY_H
